﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
    <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/bootstrap3.3.5/css/bootstrap.css" />
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body {
            font-size: 14px;
            text-align: center;
            color: #000;
        }

        li {
            list-style: none;
        }
        .xj{
            font-weight:bolder;
        }
        #pageGro {
            width: 450px;
            height: 25px;
            margin: 0 auto;
            padding-top: 30px;
        }

            #pageGro div, #pageGro div ul li {
                font-size: 12px;
                color: #999;
                line-height: 23px;
                float: left;
                margin-left: 5px;
            }

                #pageGro div ul li {
                    width: 22px;
                    text-align: center;
                    border: 1px solid #999;
                    cursor: pointer;
                }

                    #pageGro div ul li.on {
                        color: #fff;
                        background: #3c90d9;
                        border: 1px solid #3c90d9;
                    }

            #pageGro .pageUp, #pageGro .pageDown, #pageGro .pagestart, #pageGro .pageend {
                width: 63px;
                border: 1px solid #999;
                cursor: pointer;
            }
    </style>
</head>
<body ms-controller="TJBB">
    <form id="form1">
        <div class="container-fluid maindiv" style="margin-top: 20px" id="dvContent">

            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="row">
                        <div class="col-xs-6">

                            <div class="input-group">
                                <div class="input-group-addon">统计单位</div>
                                <input type="text" id="tjdw" ms-duplex="TJDATA.dwname" class="form-control" />
                                <span class="input-group-btn">
                                    <a class="btn btn-success" ms-click="seldw()">选择单位</a>
                                </span>
                            </div>
                        </div>
                        <div class="col-xs-3">

                            <div class="input-group">
                                <div class="input-group-addon">统计时间</div>
                                <input type="text" class="form-control szhl_form_date"  ms-duplex="TJDATA.tjdate" />
                            </div>
                        </div>
                       
                        <div class="col-xs-3">
                            <a class="btn btn-info" style="display:none" onclick="Preview()">打印</a>
                            <a class="btn btn-success" ms-on-click="Query()">统计</a>
                            <a class="btn btn-success" ms-on-click="daochu()">导出</a>

                        </div>
                    </div>
                </div>


            </div>
            <div id="princontent">
                <table id="FTGrid" class="table table-hover table-striped table-bordered" style="margin-bottom: 0;">
                    <thead>
                        <tr>
                            <th colspan="7" style="text-align: center; font-size: 24px">
                                {{TJDATA.title}}
                            </th>

                        </tr>
                        <tr>
                            <th colspan="3" style="text-align: left; font-size: 14px">
                                统计单位:{{TJDATA.dwname}}
                            </th>

                            <th colspan="4" style="text-align: right; font-size: 14px">
                                统计时间：{{TJDATA.tjdate}}
                            </th>
                        </tr>
                        <tr>
                            <th style="text-align: center">
                                <div class="th-inner ">序号</div>
                            </th>
                        
                            <th style="text-align: center">
                                <div class="th-inner ">款项性质</div>
                            </th>
                            <th style="text-align: center">
                                <div class="th-inner ">对方单位名称</div>
                            </th>

                          
                            <th style="text-align: center">
                                <div class="th-inner ">今日支付额</div>
                            </th>
                            <th style="text-align: center">
                                <div class="th-inner ">本月计划额度</div>
                            </th>
                            <th rowspan="2" style="text-align: center">
                                <div class="th-inner ">本月已付</div>
                            </th>
                            <th rowspan="2" style="text-align: center">
                                <div class="th-inner ">未付额</div>
                            </th>
                        </tr>
                    </thead>
                    <tbody id="tbdata" class="news">

                        <tr ms-repeat-item="TJMXDATA">
                            <td style="">{{$index+1}} </td>
                            <td >{{item.ppath}}</td>
                            <!--<td style="">{{item.FLName}}</td>-->
                            <td ms-class-1="xj:item.dfdw=='小计'" ms-class-2="text-left:item.dfdw!='小计'">{{item.dfdw}}</td>
                            <td ms-class-1="xj:item.dfdw=='小计'">{{item.DRZXJE}}</td>
                            <td ms-class-1="xj:item.dfdw=='小计'">{{item.BYJHJE}}</td>

                            <td ms-class-1="xj:item.dfdw=='小计'">{{item.BYZXJE}}</td>
                            <td ms-class-1="xj:item.dfdw=='小计'">{{item.BYWFJE}}</td>
                        </tr>



                    </tbody>
                </table>


            </div>
        </div>
    </form>
    <script type="text/javascript" src="/ViewV5/JS/jquery-1.11.2.min.js"></script>
    <script src="/ViewV5/JS/jquery-migrate-1.1.0.min.js"></script>
    <script src="/ViewV5/JS/avalon1.47.js?ver=1"></script>
    <script src="/ViewV5/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
    <script src="/ViewV5/JS/SZHLCommon.js"></script>
    <script src="/View/JS/Print.js"></script>

    <script>
        function Preview() {

        };
    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            if ($(".form_date")[0]) {
                $(".form_date").datetimepicker({
                    format: "yyyy-mm-dd"
                });
            }

        });
        var tjmodel = avalon.define({
            $id: "TJBB",
            TJDATA: { "title": "支出计划执行日报", "tjdate": "", "dwid": "", "dwname": "" },
            TJMXDATA: [],
            seldw: function () {
                top.ComFunJS.winbtnwin("/ViewV5/AppPage/XTGL/BranchSelect.html?isqx=Y&issignle=N", "选择单位", 500, 470, {}, function (layero, index) {
                    var frameid = $("iframe", $(layero)).attr('id');
                    var branch = ComFunJS.isIE() ? top.window.frames[frameid].getselectedbranch() : top.window.frames[frameid].contentWindow.getselectedbranch();
                    tjmodel.TJDATA.dwid = branch.branchid;
                    tjmodel.TJDATA.dwname = branch.branchname;
                    $("#tjdw").val(branch.branchname)
                    top.layer.close(index)

                })
            },
            daochu: function () {
                $(this).attr("href", "/API/VIEWAPI.ashx?Action=SJTJ_EXPORTZX&DC=ZCJHZXRB&P2=" + tjmodel.TJDATA.dwid + "&P1=" + top.model.JHDATA.ID + "&sdate=" + tjmodel.TJDATA.tjdate);
            },
            print: function () {
                $("#princontent").printThis({
                    debug: false,
                    importCSS: true,
                    importStyle: true,
                    printContainer: true,
                    loadCSS: "/View/CSS/bootstrap3.3.5/css/bootstrap.css",
                    pageTitle: "通知公告",
                    removeInline: false,
                    printDelay: 333,
                    header: null,
                    formValues: true
                });
            },
            Query: function () {
                $.getJSON('/API/VIEWAPI.ashx?Action=SJTJ_ZCJHZXRB', { P1: top.model.JHDATA.ID, P2: tjmodel.TJDATA.dwid, sdate: tjmodel.TJDATA.tjdate }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        tjmodel.TJMXDATA = resultData.Result;
                    }
                })
            }

        });
        avalon.ready(function () {
            ComFunJS.initForm();
            $.getJSON('/API/VIEWAPI.ashx?Action=SJTJ_ZCJHZXRB', { P1: top.model.JHDATA.ID, P2: tjmodel.TJDATA.dwid, sdate: tjmodel.TJDATA.tjdate }, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    tjmodel.TJMXDATA = resultData.Result;
                    tjmodel.TJDATA.dwname = resultData.Result1;
                }
            })
        })
    </script>

</body>
</html>


